/*
 * Powered By [fdlm]
 * Web Site: http://www.fdlm.cn
 * Since 2014 - 2015
 */

package com.sjyy.hospital.model;

import javax.validation.constraints.*;
import org.hibernate.validator.constraints.*;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import cn.org.rapid_framework.util.DateConvertUtils;

import java.util.*;

import com.sjyy.hospital.model.*;
import com.sjyy.hospital.service.*;
import com.sjyy.hospital.vo.query.*;

import javacommon.base.*;
import javacommon.util.*;
import javacommon.page.Page;

/**
 * @author cty email:caotianye@fdlm.cn
 * @version 1.0
 * @since 1.0
 */


public class Hospital extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "Hospital";
	public static final String ALIAS_HOSPITAL_ID = "hospitalId";
	public static final String ALIAS_AREA_ID = "areaId";
	public static final String ALIAS_LEVEL = "level";
	public static final String ALIAS_NAME = "name";
	public static final String ALIAS_TYPE = "type";
	public static final String ALIAS_SUMMARY = "summary";
	public static final String ALIAS_STATUS = "status";
	
	//date formats
	
	//columns START
    /** hospitalId       db_column: hospital_id */	
	
	private java.lang.Integer hospitalId;
    /** areaId       db_column: area_id */	
	@NotNull 
	private java.lang.Integer areaId;
    /** level       db_column: level */	
	@NotNull 
	private java.lang.Integer level;
    /** name       db_column: name */	
	@NotBlank @Length(max=128)
	private java.lang.String name;
    /** type       db_column: type */	
	@NotNull 
	private java.lang.Integer type;
    /** summary       db_column: summary */	
	@Length(max=256)
	private java.lang.String summary;
    /** status       db_column: status */	
	@NotNull 
	private java.lang.Integer status;
	//columns END

	public Hospital(){
	}

	public Hospital(
		java.lang.Integer hospitalId
	){
		this.hospitalId = hospitalId;
	}

	public void setHospitalId(java.lang.Integer value) {
		this.hospitalId = value;
	}
	
	public java.lang.Integer getHospitalId() {
		return this.hospitalId;
	}
	public void setAreaId(java.lang.Integer value) {
		this.areaId = value;
	}
	
	public java.lang.Integer getAreaId() {
		return this.areaId;
	}
	public void setLevel(java.lang.Integer value) {
		this.level = value;
	}
	
	public java.lang.Integer getLevel() {
		return this.level;
	}
	public void setName(java.lang.String value) {
		this.name = value;
	}
	
	public java.lang.String getName() {
		return this.name;
	}
	public void setType(java.lang.Integer value) {
		this.type = value;
	}
	
	public java.lang.Integer getType() {
		return this.type;
	}
	public void setSummary(java.lang.String value) {
		this.summary = value;
	}
	
	public java.lang.String getSummary() {
		return this.summary;
	}
	public void setStatus(java.lang.Integer value) {
		this.status = value;
	}
	
	public java.lang.Integer getStatus() {
		return this.status;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("HospitalId",getHospitalId())
			.append("AreaId",getAreaId())
			.append("Level",getLevel())
			.append("Name",getName())
			.append("Type",getType())
			.append("Summary",getSummary())
			.append("Status",getStatus())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getHospitalId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof Hospital == false) return false;
		if(this == obj) return true;
		Hospital other = (Hospital)obj;
		return new EqualsBuilder()
			.append(getHospitalId(),other.getHospitalId())
			.isEquals();
	}
}

